/*
* 公司：Leita Tech
* 版权信息：雷塔所有
* 任务：
* 描述：
* 作者：李大平
* 日期：2020/06/04
*
*/

import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12

ApplicationWindow {
    id: window
    width: 360
    height: 520
    visible: true
    title: "Leita Fund"
    font: chFont.name
    property real size_ratio: 1

    Connections
    {
        target: jsObject;
        onCanvasResized:
        {
            console.log("onCanvasResized: ", width, height);
        }
    }

    FontLoader{
        id: chFont
        source: "qrc:/font/Simplified-Chinese3500.otf"
    }

    ListView{
        id: fundView
        anchors.fill: parent
        spacing: 5
        delegate: FundItem{
            id: fundItem
        }

        model: fundModel

        Timer{
            id: fundModelTimer
            interval: 5000;
            running: true;
            repeat: true
            onTriggered: {
                console.log("start update");
                fundModel.update();
            }
        }
    }
}
